'use strict';
/**
 * @bussiness {用户}
 * @author {填写作者}
 * @date {创建时间}
 * **/
const Controller = require('egg').Controller;
class User extends Controller {
    /**
     * @effect {用户}
     * @params {id}
    **/
    async takeUserInfo(){
        const {ctx} = this;
        const params = ctx.request.query;
        console.log(params, 11111)
        const res = await ctx.service.user.index.takeDetailinfo(params)
        const userinfo = {
            id:res.id,
            uid:res.uid,
            userSex:res.user_sex,
            avatarUrl:res.avatarUrl,
            introduce:res.user_intr,
            userAge:res.user_age,
            userAddress:res.user_address,
            register_time:res.user_create_time
        }
        ctx.body = {
            status:200,
            data:userinfo,
            msg:"success"
        }
    }
}
module.exports = User;